package cn.powertime.evaluation.mapper;

import cn.powertime.evaluation.entity.DbqPostings;
import cn.powertime.evaluation.vo.RespPersonalPostingsListVo;
import cn.powertime.evaluation.vo.WebReqPostingsSearchVo;
import cn.powertime.evaluation.vo.WebRespIndexPostingsListVo;
import cn.powertime.evaluation.vo.WebRespPostingsListVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 帖子表 Mapper 接口
 * </p>
 *
 * @author liqi
 * @since 2019-09-23
 */
public interface DbqPostingsMapper extends BaseMapper<DbqPostings> {

    IPage<WebRespIndexPostingsListVo> indexList(Page page);

    /**
     * 个人发帖列表
     *
     * @param page     分页参数
     * @param userId 用户id
     * @return Page
     */
    Page<RespPersonalPostingsListVo> selectPersonalPostingsList(Page page,@Param("userId") Long userId);

    IPage<WebRespPostingsListVo> postingsList(Page page, @Param("vo")WebReqPostingsSearchVo params);
    /**
     * 个人收藏帖子列表
     *
     * @param page     分页参数
     * @param userId 用户id
     * @return Page
     */
    Page<RespPersonalPostingsListVo> selectPersonalCollects(Page page,@Param("userId") Long userId);

}
